package com.barunsw.bwf.docu_server.topology;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class TopologyServiceImpl implements TopologyService {
	@Autowired
	private TopologyDao topologyDao;
	
	@Override
	public List<TopologyClientVo> getClientList() {
		List<TopologyClientVo> clientList = topologyDao.getClientList();
		return clientList;
	}

	@Override
	public List<TopologyProjectVo> getProjectList() {
		List<TopologyProjectVo> projectList = topologyDao.getProjectList();
		return projectList;
	}

	@Override
	public int insertClient(TopologyClientVo topologyClientVo) {
		int	result = topologyDao.insertClient(topologyClientVo);
		return result;
	}

	@Override
	public int updateClient(TopologyClientVo topologyClientVo) {
		int result = topologyDao.updateClient(topologyClientVo);
		return result;
	}

	@Override
	public int deleteClient(long clientCode) {
		int result = topologyDao.deleteClient(clientCode);
		return result;
	}
	
	@Override
	public int checkClientCode(long clientCode) {
		int result = topologyDao.checkClientCode(clientCode);
		return result;
	}

	@Override
	public int checkClientName(String clientName) {
		int result = topologyDao.checkClientName(clientName);
		return result;
	}

	@Override
	public int insertProject(TopologyProjectVo topologyProjectVo) {
		int result = topologyDao.insertProject(topologyProjectVo);
		return result;
	}

	@Override
	public int updateProject(TopologyProjectVo topologyProjectVo) {
		int result = topologyDao.updateProject(topologyProjectVo);
		return result;
	}

	@Override
	public int deleteProject(TopologyProjectVo topologyProjectVo) {
		int result = topologyDao.deleteProject(topologyProjectVo);
		return result;
	}

	@Override
	public int checkProjectCode(TopologyProjectVo topologyProjectVo) {
		int result = topologyDao.checkProjectCode(topologyProjectVo);
		return result;
	}

	@Override
	public int checkProjectName(TopologyProjectVo topologyProjectVo) {
		int result = topologyDao.checkProjectName(topologyProjectVo);
		return result;
	}
}
